package com.dsz.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dsz.dao.UserDao;
/**
 * 用户Service接口实现类
 */
import com.dsz.po.User;
@Service
@Transactional
public class UserServiceImpl implements UserService {
	//通过账号密码查询用户
	@Autowired
	private UserDao userDao;
	@Override
	public User findUser(String username, String password) {
		User user = this.userDao.findUser(username, password);
		return user;
	}
	@Override
	public int addUser(User user) {
		int rows = userDao.addUser(user);
		return rows;
	}

}
